<?php
/**
 * Created by PhpStorm.
 * User: Happy
 * Date: 2017/1/14 0014
 * Time: 21:22
 */

class words_pinyinPlugin extends Plugin{
    private $_pinyin=false;
    public  function  __construct($path='')
    {
        parent::__construct($path);
        $config=$this->config;
        //子组件类
        $plugin_path= $config['plugin_path'];
        include($plugin_path.'/lib/pinyin.php');
        $this->_pinyin=new PinYin();
    }
   //全拼,默认字之间无连接符
    public function pinyin($words='',$join=''){
        return $this->_pinyin->topinyin($words);
    }
  //首字母拼音
    public  function pinyin_head($words=''){
        return CUtf8_PY::encode($words,'head');
    }


}